package com.huitone.smspfm.socket.exception;

import java.net.ConnectException;

/**   
* @Title MyConnectException.java 
* @Package com.huitone.smspfm.socket.exception 
* @Description TODO(用一句话描述该文件做什么) 
* @author ybliang   
* @date 2017年8月14日 下午5:46:13 
* @version V1.0   
*/
public class MyConnectException extends ConnectException {

	private static final long serialVersionUID = 1L;
	
	private String srvNode = null;
	
	private String host = null;
	
	private Integer port = null;
	
	public MyConnectException(String message, String host, Integer port) {
		super(message);
		this.host = host;
		this.port = port;
	}
	
	public MyConnectException(String message, String srvNode, String host, Integer port) {
		super(message);
		this.srvNode = srvNode;
		this.host = host;
		this.port = port;
	}

	public String getHost() {
		return host;
	}

	public void setHost(String host) {
		this.host = host;
	}

	public Integer getPort() {
		return port;
	}

	public void setPort(Integer port) {
		this.port = port;
	}

	@Override
	public String toString() {
		return "[srvNode=" + srvNode + ", host=" + host + ", port=" + port + "] " + super.getMessage();
	}

	@Override
	public String getMessage() {
		return "[srvNode=" + srvNode + ", host=" + host + ", port=" + port + "] " + super.getMessage();
	}
	
	

}
